package com.liu.service.vo.search;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author liuxinghong
 * @Description:
 * @date 2019/8/3/00311:39
 */
@ApiModel(description = "检索请求参数")
public class SearchRequestVO implements Serializable {
    /**
     * 检索词
     */
    @NotNull(message = "检索词不能为空！")
    @NotEmpty(message = "检索词不能为空串")
    @ApiModelProperty("检索的内容")
    public String title;

    /**
     * 检索字段（需要从哪些字段里面检索）
     */
    @ApiModelProperty("检索字段，多个用逗号隔开")
    public String fields;

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getFields() {
        return fields;
    }

    public void setFields(String fields) {
        this.fields = fields;
    }

    public SearchRequestVO() {
    }

    public SearchRequestVO(String title, String fields) {
        this.title = title;
        this.fields = fields;
    }
}
